<template name="uploadImage">
	<view class="p-4" @click="img">
		<image :src="image" class="img" mode="widthFix"></image>
	</view>
</template>

<script>
	export default{
		name:"uploadImage",
		props:{
			image:{
				type:String,
				value:'',
			}
		},
		data() {
			return {
		
			}
		},
		methods:{
			img(){
				uni.chooseImage({
				    count: 1,
				    sizeType: ['original', 'compressed'],
				    success: function(res) {	
						console.log(JSON.stringify(res.tempFilePaths));
				    }
				    });
			}
		}
	}
</script>

<style>
</style>
